<?xml version="1.0" encoding="ISO-8859-1"?>
<%@ include file="/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head></head>
	<body>
		<form action="${ctxAdm}/administrador/save/${adm.id}">
			<input type="hidden" name="adm.id" value="${adm.id}"/>
			<table>
				<tr>
					<td><fmt:message key="usuario.id"/></td>
					<td>${adm.id}</td>
				</tr>
				<tr>
					<td><fmt:message key="usuario.dataAlteracao"/></td>
					<td>${adm.dataAlteracao}</td>
				</tr>
				<tr>
					<td><fmt:message key="usuario.nome"/></td>
					<td><input type="text" name="adm.nome" value="${adm.nome}"/></td>
				</tr>
				<tr>
					<td><fmt:message key="usuario.sobrenome"/></td>
					<td><input type="text" name="adm.sobrenome" value="${adm.sobrenome}"/></td>
				</tr>
				<tr>
					<td><fmt:message key="usuario.apelido"/></td>
					<td><input type="text" name="adm.apelido" value="${adm.apelido}"/></td>
				</tr>
				<tr>
					<td><fmt:message key="usuario.email"/></td>
					<td><input type="text" name="adm.email" value="${adm.email}"/></td>
				</tr>
				<tr>
					<td><fmt:message key="usuario.senha"/></td>
					<td><input type="password" name="adm.senha" value="${adm.senha}"/></td>
				</tr>
				<tr>
					<td><fmt:message key="usuario.sexo"/></td>
					<td>
						<select name="adm.sexo">
							<option value="F" <c:if test="${adm.sexo eq 'F'}">SELECTED</c:if>>F</option>
							<option value="M" <c:if test="${adm.sexo eq 'M'}">SELECTED</c:if>>M</option>
						</select>
					</td>
				</tr>
				<tr>
					<td><fmt:message key="usuario.dataNascimento"/></td>
					<td><input type="text" name="adm.dataNascimento" value="${adm.dataNascimento}"/></td>
				</tr>
				<tr>
					<td><fmt:message key="tipoUsuario.title"/></td>
					<td>
						<select name="adm.tipoUsuario.id">
							<c:forEach items="${tipoUsuarioList}" var="tipoUsuario">
								<option value="${tipoUsuario.id}" <c:if test="${adm.tipoUsuario.id eq tipoUsuario.id}">SELECTED</c:if>>${tipoUsuario.tipo}</option>
							</c:forEach>
						</select>
					</td>
				</tr>
			</table>
			<input type="button" onclick="location.href='${ctxAdm}/administrador/list'" value="Cancelar"/>
			<input type="button" onclick="location.href='${ctxAdm}/administrador/delete/${adm.id}'" value="Apagar"/>
			<input type="submit" value="Salvar"/>
		</form>
	</body>
</html>
